﻿//Write a program that calculates N!/K! for given N and K (1<K<N).

using System;

class FactorialDivision
{
    static void Main()
    {
        Console.Write("Enter N = ");
        uint n = uint.Parse(Console.ReadLine());
        Console.Write("Enter K = ");
        uint k = uint.Parse(Console.ReadLine());
        
        if (k > 1 && n > k)
        {
            uint result = n;
            for (uint i = 1; i < (n - k); i++)
            {
                result = result * (n - i);
            }
            Console.WriteLine("{0}!/{1}! = {2}", n, k, result);
        }
        else
        {
            Console.WriteLine("Out of range (1 < K < N) !");
        }
    }
}
